package io.renren.modules.areaem.service.impl;

import io.renren.modules.areaem.entity.AreaemployeenumEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;

import io.renren.modules.areaem.dao.AreaemployeeDao;
import io.renren.modules.areaem.entity.AreaemployeeEntity;
import io.renren.modules.areaem.service.AreaemployeeService;


@Service("areaemployeeService")
public class AreaemployeeServiceImpl extends ServiceImpl<AreaemployeeDao, AreaemployeeEntity> implements AreaemployeeService {

    @Autowired
    AreaemployeeDao areaemployeeDao;
    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<AreaemployeeEntity> page = this.page(
                new Query<AreaemployeeEntity>().getPage(params),
                new QueryWrapper<AreaemployeeEntity>()
        );

        return new PageUtils(page);
    }

    @Override
    public List<AreaemployeenumEntity> getEmpNum() {
        return areaemployeeDao.getEmpNum();
    }

}